﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using Yoda.Classes;

namespace YodaSL.Web
{
	// NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IJediService" in both code and config file together.
	[ServiceContract]
	public interface IJediService
	{
		#region Tournament methods

		[OperationContract]
		Tournament CreateTournament();

		#endregion

		#region Match methods

		[OperationContract]
		Match NewMatch(Tournament currentTour, string firstDouble, string secondDouble);

		[OperationContract]
		Match GetMatch(string matchId);

		[OperationContract]
		MatchControl GetMatchControl(string matchId);

		#endregion


		#region Player methods

		[OperationContract]
		List<Player> ListPlayers();

		[OperationContract]
		Player GetPlayer(string nickName);

		#endregion

		#region Doubles methods

		[OperationContract]
		List<Doubles> ListDoubles(string namePrefix);

		[OperationContract]
		Doubles GetDouble(string doublesName);

		#endregion


		#region Events methods

		[OperationContract]
		SortedList<int, TennisEvent> MatchEvents(string matchId);

		[OperationContract]
		bool GetEvent(TennisEvent happened);


		#endregion
	}


}
